from progressbar import *
import time

total = 100

def dosomething():
    time.sleep(0.1)

pbar = ProgressBar()
for i in pbar(range(total)):
    dosomething()

print('done')